// Copyright 2010 Alexandre Tristan St-Cyr <tristan.stcyr@gmail.com>

package com.codeplex.loadjava.model;


public class MethodParameter {
	private MethodDefinition method;
	
	private TypeReference type;
	
	private int index;
	
	public MethodParameter(MethodDefinition method, 
			TypeReference type, int index) {
		this.method = method;
		this.type = type;
		this.index = index;
	}
	
	public MethodDefinition getMethodDefinition()
	{
		return this.method;
	}
	
	public TypeReference getType()
	{
		return this.type;
	}
	
	public int getIndex()
	{
		return this.index;
	}
	
	@Override
	public boolean equals(Object o) {
		if (!this.getClass().isInstance(o))
			return false;
		MethodParameter otherParam = (MethodParameter)o;
		return this.method.equals(otherParam.method) 
			&& this.type.equals(otherParam.type)
			&& this.index == otherParam.index;
	}
}
